import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional, IsNumber, Min } from 'class-validator';
import { Type } from 'class-transformer';

export class QuerySecurityStatisticsDto {
  @ApiPropertyOptional({
    description: '开始时间戳（毫秒）',
    example: 1640995200000,
    required: false,
  })
  @IsOptional()
  @IsNumber()
  @Min(0)
  @Type(() => Number)
  startTime?: number;

  @ApiPropertyOptional({
    description: '结束时间戳（毫秒）',
    example: 1641081600000,
    required: false,
  })
  @IsOptional()
  @IsNumber()
  @Min(0)
  @Type(() => Number)
  endTime?: number;
}
